package com.leesk.trial.springbootautoconfiguration;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.event.ApplicationEventMulticaster;
import org.springframework.context.event.SimpleApplicationEventMulticaster;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;


@SpringBootApplication
public class SpringBootAutoconfigurationApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootAutoconfigurationApplication.class, args);
    }

    //    Component注解用于需要作为能被自动检测到的类（基于类路径扫描，即底层的实现方法为反射）
    @Component
    static class CustomCommandLineRunner implements CommandLineRunner{

        @Override
        public void run(String... args) throws Exception {
            System.out.println("leesk的实验二，完成自动加载实现了CommandLineRunner接口的bean");
        }
    }


}
